//
//  HZ_Find_Two_CollectionViewCell.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/3/31.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZ_Find_Two_CollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "HZ_Lable.h"
@interface HZ_Find_Two_CollectionViewCell ()


@property (nonatomic, strong) HZ_Lable *label;
@property (nonatomic, strong) UIImageView *image;

@end
@implementation HZ_Find_Two_CollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    
    if (self) {
    
//        self.backgroundColor = [UIColor clearColor];
        
        self.image = [[UIImageView alloc] initWithFrame:CGRectMake(self.bounds.size.width / 4, self.bounds.size.height / 10, self.bounds.size.width / 2, 4 * self.bounds.size.height / 10)];
        
        self.image.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:self.image];
        
        self.label = [[HZ_Lable alloc] initWithFrame:CGRectMake(0, self.bounds.size.height / 2, self.bounds.size.width, self.bounds.size.height / 2)];
        self.label.textAlignment = 1;
//        self.label.textColor = [UIColor blackColor];
//        self.label.backgroundColor = [UIColor clearColor];
        _label.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.label];
        
        
    }
    
    return self;
}


-(void)setModel:(HS_DataArray_Model *)model{
    
    _model = model;
    

    
    self.label.text = model.name;
    
    [self.image sd_setImageWithURL:[NSURL URLWithString:model.picUrl]];
    
    
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
